<script setup lang="ts">
 import { ElConfigProvider } from 'element-plus'

import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { RouterLink, RouterView } from 'vue-router'
import Header from "@/components/public/header.vue"
import {useRoute} from "vue-router"
const route = useRoute()
const no_show_header = ["/login","/forgot","/login/","/forgot/","/404","/404/"]
console.log(route,"$route.meta.keepAlive");

</script>

<template>
  <div class="main">
    <el-config-provider :locale="zhCn">
      <Header v-if="!no_show_header.includes(route.path)"/>
    <router-view v-slot="{ Component }">
    <keep-alive>
      <component :is="Component"  v-if="$route.meta.keepAlive"/>
    </keep-alive>
    <component :is="Component"  v-if="!$route.meta.keepAlive"/>
  </router-view> 
  </el-config-provider>
  </div>
</template>
<style lang="scss" scoped>
.main{
  min-width: 1200px;
}
</style>

